package jman.service;

import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;

import jman.dao.VoteDao;
import jman.mode.Vote;

public class VoteService {
	public List<Vote> getListForStudent(int id) throws SQLException{
		List<Vote> voteList=new ArrayList<Vote>();
		VoteDao vd=new VoteDao();
		voteList=vd.getVoteListByStudentId(id);
		return voteList;
	}
	public List<Vote> getListForStudentToVote(int id) throws SQLException{
		List<Vote> voteList=new ArrayList<Vote>();
		VoteDao vd=new VoteDao();
		voteList=vd.getVoteListByStudentIdToVote(id);
		return voteList;
	}
	public List<Vote> getListForTeacher(int id) throws SQLException{
		List<Vote> voteList=new ArrayList<Vote>();
		VoteDao vd=new VoteDao();
		voteList=vd.getVoteListByTeacherId(id);
		return voteList;
	}
}
